﻿using System;
namespace diantou.web.exam
{
    /// <summary>
    /// 用户考试题目
    /// </summary>
    //[fastCSharp.code.cSharp.webView.clientType(Name = "diantou.userExamProblem")]
    struct userProblem
    {
        /// <summary>
        /// 考试题目
        /// </summary>
        public diantou.examDataAccess.examProblem Problem;
        /// <summary>
        /// 用户信息
        /// </summary>
        public diantou.dataAccess.user User;
        /// <summary>
        /// 是否存在编辑权限
        /// </summary>
        public bool IsPermission
        {
            get
            {
                return User != null && Problem != null && (User.Permission == diantou.dataModel.user.permission.Admin || Problem.UserId == User.Id);
            }
        }
    }
}
